package com.xyzwps.paimon.furina.infra

fun <T, K> List<T>.keyBy(getKey: (T) -> K): Map<K, T> = this.fold(mutableMapOf()) { m, t ->
    m[getKey(t)] = t
    return m
}